From cead514ad859ee4fdfe3d56a1585bd9f27c3d684 Mon Sep 17 00:00:00 2001 From: Keir Fraser Date: Fri, 25 Jul 2008 13:58:23 +0100 Subject: [PATCH] xend: fix dual destroy After changeset 18030 and 18064 were checked in, I found some issues when creating HVM domains with devices assigned. Signed-off-by: Dexuan Cui --- tools/python/xen/xend/XendDomainInfo.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tools/python/xen/xend/XendDomainInfo.py b/tools/python/xen/xend/XendDomainInfo.py index 5052009158..82ee454787 100644 --- a/tools/python/xen/xend/XendDomainInfo.py +++ b/tools/python/xen/xend/XendDomainInfo.py @@ -2374,6 +2374,9 @@ class XendDomainInfo: def destroy(self): """Cleanup VM and destroy domain. Nothrow guarantee.""" + if self.domid is None: + return + log.debug("XendDomainInfo.destroy: domid=%s", str(self.domid)) paths = self._prepare_phantom_paths() -- 2.30.2